package router

import (
	"api_getway/handler/api"
	"api_getway/middleware"
	"github.com/gin-gonic/gin"
)

func Router(r *gin.Engine) {
	r.GET("list/book", api.BookList)

	auth := r.Group("/api/")

	auth.Use(middleware.AuthUserMiddleware())
	{
		auth.POST("add/book", api.AddBook)
		auth.POST("update/book", api.UpdateStatus)
		auth.POST("del/book", api.DelBook)
	}
}
